package com.chhh.cranelease.controller;

import com.chhh.cranelease.model.UserWithRole;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;


@Controller
public class DirectController {

    @RequestMapping("login")
    public String login(){
        return "login";
    }
    @RequestMapping("registered")
    public String registered(){
        return "registered";
    }
    @RequestMapping("success")
    public String success(){
            return "success";
    }
    @RequestMapping("logout")
    public String logout(HttpSession session){
        session.invalidate();
        return "login";
    }
    @RequestMapping("userInfo")
    public String userInfo(){
        return "userInfo";
    }
    @RequestMapping("userPage")
    public String userPage(){
        return "userPage";
    }
    @RequestMapping("contact")
    public String contactPage(){
        return "contact";
    }

    @RequestMapping("order")
    public String order(){
        return "order";
    }
}
